package com.ac.controller;

import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.ac.model.AuthPhone;
import com.ac.response.Res;
import com.ac.service.AuthPhoneService;

import lombok.AllArgsConstructor;

@RestController
@RequestMapping("auth/phone")
@AllArgsConstructor
public class AuthPhoneController {

	private final AuthPhoneService PhoneService;

	@PostMapping(value = "sendCode")
	public Res sendCode(@RequestBody AuthPhone authPhone) {
		int num = PhoneService.sendCode(authPhone);
		return Res.success("发送成功", num);
	}

}
